package com.xindacloud.sms.console.system.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.xindacloud.sms.console.result.Result;
import com.xindacloud.sms.console.system.dto.SmsWebsiteDTO;
import com.xindacloud.sms.console.system.entity.SmsDeliveryReceipt;
import com.xindacloud.sms.console.system.entity.SmsWebsiteInfo;
import com.xindacloud.sms.console.system.service.ISmsWebsiteInfoService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author czc
 * @since 2019-10-14
 */
@Api(tags = {"网站信息模块"})
@RestController
@RequestMapping("/api/v1/sms-website-info")
public class SmsWebsiteInfoController {
	
	@Autowired
	private ISmsWebsiteInfoService smsWebsiteInfoService;
	
	@ApiOperation(value = "获取网站信息",response=SmsWebsiteInfo.class)
	@PostMapping(value = "/getSmsWebsiteInfo")
	public Result getSmsWebsiteInfo(@RequestBody SmsWebsiteDTO smsWebsiteDTO) {
	    return smsWebsiteInfoService.getSmsWebsiteInfo(smsWebsiteDTO);
	}
	
	@ApiOperation(value = "保存或修改网站信息")
	@PostMapping(value = "/saveOrUpdateSmsWebsiteInfo")
	public Result saveOrUpdateSmsWebsiteInfo(@RequestBody SmsWebsiteInfo smsWebsiteInfo) {
	    return smsWebsiteInfoService.saveOrUpdateSmsWebsiteInfo(smsWebsiteInfo);
	}


}
